Add /push-pr-update skill for pushing PR revisions#111
Conversation
This skill streamlines the workflow for pushing updates to existing PRs: - Stages and commits local changes with optional custom message - Pushes to the PR branch - Triggers AI code review via /ai-review comment (can be skipped with --no-review) - Includes same secret scanning safeguards as /submit-pr Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Overall Assessment Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…ount - Fix P2: Check for upstream tracking branch before push; use `git push -u origin HEAD` when no upstream is configured - Fix P3: Dynamically detect default branch using `gh repo view` instead of hardcoding "main" - Fix P3: Capture files changed count after staging for accurate reporting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
1 similar comment
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…t leak
1. Handle committed-but-unpushed changes: Clean working tree no longer
blocks push when branch has committed changes ahead of upstream.
Uses `git rev-list --count @{u}..HEAD` to detect unpushed commits.
2. Fix fork workflow: AI review comment now targets the PR's base
repository instead of the fork's origin. Uses `gh pr view --json
baseRepository` to get the correct upstream repo.
3. Prevent secret value leaks: Changed from `grep` (which echoes
matching content) to `git diff -G ... --name-only` (which only
outputs file names, not the matching secret values).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
Fix two P1 issues from AI code review:
1. Reorder PR lookup before changes check (Section 2.3 ↔ 2.4)
- PR lookup now runs BEFORE "skip to Section 4" paths
- Ensures PR metadata is always available for reporting
2. Handle missing upstream tracking branch correctly
- No upstream + local commits → proceed to push with -u
- No upstream + no commits → abort with new error message
- Has upstream + ahead → proceed to push
- Has upstream + not ahead → abort (existing behavior)
Previously, missing upstream caused `git rev-list @{u}..HEAD` to fail,
the error was suppressed with `|| echo "0"`, and workflow incorrectly
aborted even when local commits existed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Findings
Overall Assessment: Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
Open Questions/Assumptions
Change Summary
|
The \s shorthand doesn't work in POSIX ERE (used by git diff -G and grep -E). Replace with [[:space:]] character class for proper whitespace matching. This fixes the security scan to correctly detect patterns like: - api_key = "secret" - bearer <token> - password : "value" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary:
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
Security (P2): Make secret pattern matching case-insensitive using POSIX character classes. Patterns like api_key now match API_KEY, Api_Key, etc. Token prefixes (AKIA, ghp_, sk_, gho_) remain case-sensitive as intended. Logic (P3): Fix "no commits" guard to compare against default branch. Changed from `git rev-list --count HEAD` (counts ALL commits) to `git rev-list --count <default-branch>..HEAD` (counts commits unique to this branch). Updated error messages accordingly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…an, files count - Fix default branch detection: fall back to origin/<default-branch> when local branch doesn't exist (handles shallow clones) - Add secret scanning for already-committed changes in push-only path (Section 3a) - previously only staged changes were scanned - Compute <files-changed-count> in push-only path for accurate reporting - Fix git diff -G exit status: use || true to prevent abort on pattern match - Use variable capture pattern for consistent secret detection handling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary:
Methodology:
Code Quality:
Performance:
Maintainability:
Tech Debt:
Security:
Documentation/Tests:
Open Questions/Assumptions:
|
…et leak - push-pr-update: Add fallback to fetch origin/<default-branch> when neither local nor remote ref exists in single-branch clones - submit-pr: Switch secret scan from piping diff content to using -G with --name-only to prevent secrets from appearing in logs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: ✅ Looks good Executive summary:
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
Summary
/push-pr-updateskill for streamlined PR update workflow/ai-reviewcomment (configurable with--no-review)/submit-prMethodology references
Validation
/push-pr-updateon a branch with uncommitted changes and an open PRSecurity / privacy
/submit-prbehavior)Generated with Claude Code